﻿using System.ComponentModel.DataAnnotations;
using Lbb.Localization;

namespace Lbb.DataAnnotations
{
    /// <summary>
    /// 指定数据字段是QQ号码.
    /// </summary>
    /// <author>Chiron</author>
    public class NQQAttribute : RegularExpressionAttribute
    {
        /// <summary>
        /// 指定数据字段是QQ号码.
        /// </summary>
        public NQQAttribute()
            : base(@"^\d{5,15}$")
        {
            ErrorMessageResourceType = typeof(ErrorRes);
            ErrorMessageResourceName = "RegularQQ";
        }
    }
}
